package cn.dhnapplets.controller;

import cn.dhnapplets.entity.Result;
import cn.dhnapplets.entity.openId;
import cn.dhnapplets.service.EnvironmentalGuardService;

import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author 邱文彬
 * @Date 2021/11/12 15:18
 * @Version 1.0
 */


@RestController
public class EnvironmentalGuardController {


    @Autowired
    private EnvironmentalGuardService environmentalGuardService;

//    根据openId获取用户的推广下级
@ApiOperation("根据openId获取用户的推广下级")
    @RequestMapping(value = "getEnvironmentalGuardAllByOpenId",method = RequestMethod.POST)
    public Result getEnvironmentalGuardAllByOpenId(@RequestBody openId openId){

        return  environmentalGuardService.getEnvironmentalGuardAllByOpenId(openId.getOpenId(),openId.getPage(),openId.getRecord());
    }




}
